User-friendly biplots in R
Centre for Multi-Dimensional Data Visualisation (MuViSU)
muvisu@sun.ac.za
SASA2024
means() function allows the user to make adjustments to the points representing the class meansThe which argument allows the user to indicate which of the class means should be displayed in the biplot.
The following arguments control the aesthetic options for the plotted class mean points:
col: the colours for the points
pch: the plotting characters for the points
cex: the character size for the points
opacity: the transparency of the points
shade.darker: a TRUE or FALSE value indicating whether the points should be a shade darker than the samples
The following arguments control the aesthetic options for the labels accompanying the plotted class mean points:
label: a TRUE or FALSE value indicating whether labels are displayed
label.col: the colours for the labels
label.cex: the character size for the labels
label.side: the side at which the label appears
label.offset: the offset of the label
This function creates classification regions for the CVA biplot
The classify() function appends the biplot object with the following elements:
A confusion matrix from the classification into classes
The classification accuracy rate
A logical value indicating whether classification regions are shown in the biplot
A list of chosen aesthetics for the classification regions
The midpoints of the classification regions
This function creates \(\alpha\)-bags
The alpha.bags() function appends the biplot object with the following elements:
A list of coordinates for the \(\alpha\)-bags for each group
A vector of colours for the \(\alpha\)-bags
A vector of line types for the \(\alpha\)-bags
A vector of line widths for the \(\alpha\)-bags
ab.examp<-biplot(state.x77) |> CVA(state.region) |> alpha.bags(alpha = c(0.85,0.9,0.95,0.99),lty = c(1,2,3,4))# Computing 0.85 -bag for Northeast
# Computing 0.9 -bag for South
# Computing 0.95 -bag for North Central
# Computing 0.99 -bag for West
This function creates \(\kappa\)-ellipses
The ellipses() function appends the biplot object with the following elements:
A list of coordinates for the \(\kappa\)-ellipses for each group
A vector of colours for the \(\kappa\)-ellipses
A vector of line types for the \(\kappa\)-ellipses
A vector of line widths for the \(\kappa\)-ellipses
A vector of \(\alpha\) values
kc.examp<-biplot(state.x77) |> CVA(state.region) |> ellipses(alpha = c(0.85,0.9,0.95,0.99),lwd = c(1,2,3,4))# Computing 1.95 -ellipse for Northeast
# Computing 2.15 -ellipse for South
# Computing 2.45 -ellipse for North Central
# Computing 3.03 -ellipse for West
The dim.biplot argument can be set to 3 to allow the user to create a 3D biplot. The plot() function makes use of the RGL device for the 3D display.